package com.ffspace.servlet;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import cn.wanghaomiao.seimi.core.Seimi;

public class CrawlerServlet extends HttpServlet{

    /**
	 * 序列号
	 */
	private static final long serialVersionUID = 1L;
	
	private static Logger logger = LoggerFactory.getLogger(CrawlerServlet.class);

	public void init() throws ServletException {
		Seimi s = null;
		try
		{
			s = new Seimi();
	        s.start("basic");
		}
		catch(Exception e)
		{
			logger.error("CrawlerServlet error", e);
		}
		finally
		{
			if (s != null)
			{
				s.close();
			}
		}
    }
}
